package com.yst.webplugin.additional.transform;

import com.yst.webplugin.annotation.Default;

import java.lang.annotation.*;

@Target({ElementType.FIELD})
@Retention(RetentionPolicy.RUNTIME)
@Documented
public @interface Transform {
    /**
     * name of source field,
     */
    String sourceField() default "";

    /**
     * name of target field
     */
    String destField() default "";

    /**
     * name of dictionary,if specific this,dictClass is invalid
     */
    String dictionaryName() default "";

    /**
     * class of dictionary,if not specific dictionaryName,must specific this parameter
     * @return
     */
    Class<?> dictClass() default Default.class;

    @Target({ElementType.TYPE})
    @Retention(RetentionPolicy.RUNTIME)
    @Documented
    @interface List{
        Transform[] value();
    }
}
